package javacafe.action.noticeboard;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.bbspost.BbsPostDTO;
import javacafe.serviceimple.BbsPostServiceImple;

public class NoticeAction implements Action {
	
	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		
		ActionForward actfoward = new ActionForward();
		
		BbsPostServiceImple service = BbsPostServiceImple.getInstance();
		List<BbsPostDTO> list = null;
		BbsPostDTO dto = new BbsPostDTO();
		
		dto.setBbs_no(1);
		
		list = service.getBbsPostList(dto);
				
		request.setAttribute("list",list);
		actfoward.setUrl("noticeboard");
		return actfoward;
	}
}
